import request from '@/utils/request.js'

// 查询预约信息列表
export function listMsg(query) {
  return request({
    url: '/system/msg/list',
    method: 'get',
    params: query
  })
}

// 查询预约信息详细
export function getMsg(customerId) {
  return request({
    url: '/system/msg/' + customerId,
    method: 'get'
  })
}

//根据customerId和roomId查询单条的预约信息
export function getMsgByKey(customerId,roomId) {
  return request({
    url: '/system/msg/getMsgByKey/'+customerId+'/'+roomId,
    method: 'get'
  })
}
// 新增预约信息
export function addMsg(data) {
  return request({
    url: '/system/msg',
    method: 'post',
    data: data
  })
}

// 修改预约信息
export function updateMsg(data) {
  return request({
    url: '/system/msg',
    method: 'put',
    data: data
  })
}

// 删除预约信息
export function delMsg(customerId,roomId) {
  return request({
    url: '/system/msg/'+customerId+'/'+roomId,
    method: 'delete'
  })
}
